import pytest,os,logging,yagmail
class Tools():
    def Log1(self):
        # 日志
        log1 = logging.basicConfig(level=logging.DEBUG,
                                   filename='A3mall.log',
                                   filemode='a+',
                                   format='%(levelname)s %(filename)s %(message)s %(lineno)d')
        return log1
    def Baogao(self):

        # allure报告
        pytest.main(['-s','untils_01.py','--clean-alluredir','--alluredir=./Baogao'])
        os.system('allure generate ./Baogao -o ./html --clean')
        print("报告生成好了！在 ./html 文件夹里")

        # bb = yagmail.SMTP(user='3153075207@qq.com', password='mrqrvidbupdcddgd', host='smtp.qq.com')
        # bb.send(to='3153075207@qq.com', subject='报告', contents=['a3mall.log'])
        # bb.close()